/*** Eclipse Class Decompiler plugin, copyright (c) 2012 Chao Chen (cnfree2000@hotmail.com) ***/
package com.qihoopp.qcoinpay;

import android.graphics.Bitmap;
import android.graphics.drawable.BitmapDrawable;
import com.qihoopp.framework.LogUtil;

public class s extends BitmapDrawable {
    private int a;
    private int b;
    private boolean c;

    public final void a(boolean paramBoolean) {
        synchronized (this) {
            if (paramBoolean)
                this.a += 1;
            else
                this.a -= 1;
        }
        a();
    }

    private synchronized void a() {
        if ((this.a > 0) || (this.b > 0) || (!(this.c)) || (!(b())))
            return;
        LogUtil.d("CountingBitmapDrawable", "No longer being used or cached so recycling. " + super.toString());
        getBitmap().recycle();
    }

    private synchronized boolean b() {
        Bitmap localBitmap;
        return (((localBitmap = getBitmap()) != null) && (!(localBitmap.isRecycled())));
    }
}